feat(content): clarify page and collection creation - #5592
Conversation
…erty-mutation-parity
- Exclude legacy authorityScope from the mutation payload digest so retries through old callers replay instead of colliding on IDEMPOTENCY_KEY_REUSED. - Reject empty propertyEntries arrays instead of silently canonicalizing them to a no-op mutation. - Check durable replay before typed property assertion validation so a retried committed mutation replays even if the property's type later changed. - Register list-content-databases and get-content-database fixtures in the dedicated property-preservation runner so discovery can succeed before the create call.
…rvation create call expected_property_values now requires list-content-databases and get-content-database to complete without error and validates their result payloads (discovered database and mutation contract target/schema revision) match the fixture create target, instead of only checking call order and input shape.
…ollection-choice # Conflicts: # templates/content/actions/_database-row-mutation.ts # templates/content/actions/add-database-item.ts # templates/content/actions/update-database-item.ts # templates/content/actions/upsert-database-item-by-key.ts # templates/content/app/components/editor/DocumentEditor.layout.test.ts # templates/content/app/components/editor/DocumentEditor.tsx # templates/content/app/components/sidebar/DocumentSidebar.layout.test.ts # templates/content/app/components/sidebar/DocumentSidebar.tsx # templates/content/app/i18n-data.ts # templates/content/app/i18n/zh-TW.ts # templates/content/docs/solutions/2026-09-02-content-suggested-edits-parity-shape.md
|
Here's a visual recap of what changed: Open the full interactive recap |
There was a problem hiding this comment.
Builder reviewed your changes and found 1 potential issue 🟡
Review Details
Code Review Summary
This incremental review covers the latest 25-file update to PR #5592, which refines Content Page/Collection creation, adds inline and full-page slash-command flows with compensating cleanup, sequences workspace selection before creation, and scopes the Slides design-system cache update with an editor access filter. The core UI and state-management approach is sound, and the previously reported inline slash-input-loss and stale explicit-workspace-selection issues are fixed in this head; both existing threads were resolved rather than reposted. Focused tests passed: 180 Content tests across the affected editor/sidebar suites and 3 Slides design-system tests. The test process also emitted expected local connection errors while probing unavailable services, but the suites completed successfully.
Key Findings
🟡 MEDIUM
- Slash-command rollback invokes admin-only deletion actions even though the corresponding creation actions allow an editor of the host page. A non-admin collaborator can therefore create an inline or full-page collection, fail while persisting the parent, and leave the newly-created collection behind because client cleanup is rejected.
Architecture and validation
The new create-then-persist flow correctly avoids deleting inline slash text before creation succeeds, and cleanup attempts reference removal independently from resource deletion. Workspace selection now restores the prior explicit-selection state when selection fails, and the Slides update predicate is appropriately constrained by accessFilter(..., "editor"). The remaining authorization mismatch should be addressed with a narrowly scoped rollback operation or server-owned transactional compensation rather than the normal admin-only trash actions.
🧪 Browser testing: Planned full visual verification, but all 19 cases were blocked because browser executor agents had no Chrome/MCP tools exposed. The dev server was healthy with Content mounted at /content; no browser success or failure was claimed.
There was a problem hiding this comment.
Builder reviewed your changes and found 1 potential issue 🟡
Review Details
Code Review Summary
This incremental review covers the current PR head and the Content creation flows, slash-command persistence, workspace sequencing, and Slides access-scoped cache update. The previously reported admin-only cleanup mismatch remains present and was intentionally not reposted because its review thread is still open. The latest code continues to use the corrected editor/workspace behavior, and focused validation passed: 180 Content tests across the affected editor/sidebar suites and 3 Slides design-system tests.
Key Findings
🟡 MEDIUM
- Full-page
/databaseslash creation does not provide the stable document/idempotency identifiers used by the sidebar creation path. A committed request whose response is lost cannot be replayed or reconciled, and a retry can create a duplicate child collection; because the cleanup state is assigned only after the response, the original resource can also become orphaned.
Architecture and validation
The existing create-then-insert ordering is sound for preserving editor input on early failures, and workspace selection recovery remains correct. The Slides accessFilter(..., "editor") update remains appropriately scoped. The full-page slash path should be routed through the existing reliable creation request shape or generate and pass a stable newDocumentId/idempotencyKey before invoking the mutation.
🧪 Browser testing: Planned full visual verification across 18 cases, but all cases were blocked because Chrome/MCP tools were unavailable to browser executor agents. The dev server was healthy with Content mounted at /content; no browser success or failure was claimed.
There was a problem hiding this comment.
Builder reviewed your changes and found 3 potential issues 🟡
Review Details
Code Review Summary
This incremental review covers the new creator-scoped rollback action and its wiring into Page, inline Collection, and full-page Collection slash commands, alongside the existing workspace-selection and Slides access-control changes. The two previously reported comments remain open and were not reposted: the full-page idempotency-key concern and the earlier cleanup authorization concern. The new rollback action improves authorization and eligibility checks, and focused validation passed: 74 Content tests across rollback, slash-command, and sidebar suites, plus 3 Slides design-system tests.
Key Findings
🟡 MEDIUM
- Inline and full-page slash creation can commit the child resource before the mutation returns its result; if post-commit response/readback or refresh work fails, the client never receives the ID needed to invoke rollback, leaving an unlinked collection behind.
- Cross-workspace creation switches with navigation suppressed but does not mark the target as an explicit selection. Route reconciliation can therefore switch the sidebar back to the active document's old workspace before creation completes.
Architecture and validation
The creator-scoped rollback action is a good improvement: it requires parent editor access, verifies creator identity, freshness, unchanged content, and absence of links/children before trashing transactionally. However, the client still needs a recoverable creation contract for post-commit failures, and the workspace selection needs to participate in the existing explicit-selection reconciliation guard. Focused tests passed, while full browser verification was blocked by unavailable Chrome/MCP executor tools despite a healthy dev server.
🧪 Browser testing: Planned full visual verification across 20 cases, but all cases were blocked because Chrome/MCP tools were unavailable to browser executor agents. No live UI success or failure was claimed.

Content’s plus button used to create a page immediately, even when the user wanted a collection. The editor’s earlier type chooser also disappeared after a title was entered. This PR makes the object type an explicit choice while keeping page writing fast.
/databaseoffers inline and full-page collections. Full-page insertion replaces its containing paragraph as a block, matching/page, and uses a stable document ID/idempotency key so a lost response can be retried without a duplicate. Inline collection and slash Page creation allocate document IDs before calling their actions, allowing cleanup even when a creation response is lost; inline creation also supplies its block ID. All slash Page/Collection creation paths remove a newly inserted reference and use a creator-scoped rollback action if saving the parent fails; the action refuses to trash a linked or changed resource and distinguishes an absent resource from one it moved to Trash. Both collection paths use collection-neutral success feedback in every locale.No schema changes are involved. During final CI, a security guard found an unscoped cache update in Slides inherited from
main; the update now requires editor access in its SQL predicate. Viewer reads still return the design system, but no longer write that cache field.Validation
mainmerge. Local production-credential diagnostics are expected in this dev environment./databasecollection; its table persisted after reload. A separate/pagecommand created a child Page and retained the parent reference after reload. The browser reported no errors. On the preceding head, the full-page/databaseflow created one collection, opened its table, and retained the parent reference after reload with no browser console or network errors. Disposable QA pages and their children were moved to Trash. The lost-response cleanup paths are covered by focused database and hook tests; a real network response-loss simulation has not been run.